/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * managementmodule.java
 *
 * Created on Jul 25, 2011, 12:02:30 AM
 */
package introse1;

/**
 *
 * @author Trisha
 */
public class managementmodule extends javax.swing.JFrame {

    /** Creates new form managementmodule */
    public managementmodule(Login Login, String name, String password) {
        initComponents();
        this.Login = Login;
        pangalan = name;
        pass = password;
        Login.setVisible(false);
        this.setLocationRelativeTo(null);
        this.setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        ManageOrderButton = new javax.swing.JButton();
        ManageInventoryButton = new javax.swing.JButton();
        ManageMenuButton = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        ChangePasswordButton = new javax.swing.JButton();
        LogoutButton = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        ManageOrderButton.setFont(new java.awt.Font("Rockwell", 0, 18));
        ManageOrderButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/manageorder.png"))); // NOI18N
        ManageOrderButton.setBorder(null);
        ManageOrderButton.setBorderPainted(false);
        ManageOrderButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageOrderButtonActionPerformed(evt);
            }
        });

        ManageInventoryButton.setFont(new java.awt.Font("Rockwell", 0, 18));
        ManageInventoryButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/ManageInventory.png"))); // NOI18N
        ManageInventoryButton.setBorder(null);
        ManageInventoryButton.setBorderPainted(false);
        ManageInventoryButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageInventoryButtonActionPerformed(evt);
            }
        });

        ManageMenuButton.setFont(new java.awt.Font("Rockwell", 0, 18));
        ManageMenuButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/managemenu.png"))); // NOI18N
        ManageMenuButton.setBorder(null);
        ManageMenuButton.setBorderPainted(false);
        ManageMenuButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageMenuButtonActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Rockwell", 0, 24));
        jLabel2.setText("Account Settings:");

        ChangePasswordButton.setFont(new java.awt.Font("Rockwell", 0, 18));
        ChangePasswordButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/changepassword.png"))); // NOI18N
        ChangePasswordButton.setBorder(null);
        ChangePasswordButton.setBorderPainted(false);
        ChangePasswordButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ChangePasswordButtonActionPerformed(evt);
            }
        });

        LogoutButton.setFont(new java.awt.Font("Rockwell", 0, 18));
        LogoutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/logout.png"))); // NOI18N
        LogoutButton.setBorder(null);
        LogoutButton.setBorderPainted(false);
        LogoutButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LogoutButtonActionPerformed(evt);
            }
        });

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse1/Haj Logo.JPG"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ManageOrderButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ManageInventoryButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ManageMenuButton))
                        .addGap(54, 54, 54)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(LogoutButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(ChangePasswordButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jSeparator1)
                        .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(7, 7, 7)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ChangePasswordButton)
                        .addGap(18, 18, 18)
                        .addComponent(LogoutButton))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(ManageInventoryButton)
                        .addGap(18, 18, 18)
                        .addComponent(ManageMenuButton)
                        .addGap(18, 18, 18)
                        .addComponent(ManageOrderButton)))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-492)/2, (screenSize.height-476)/2, 492, 476);
    }// </editor-fold>//GEN-END:initComponents

    private void ManageInventoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageInventoryButtonActionPerformed
        this.setVisible(false);
        manage_inventory next = new manage_inventory(this);
        next.setVisible(true);
    }//GEN-LAST:event_ManageInventoryButtonActionPerformed

    private void ManageMenuButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageMenuButtonActionPerformed
        this.setVisible(false);
        manage_menu next = new manage_menu(this);
        next.setVisible(true);
    }//GEN-LAST:event_ManageMenuButtonActionPerformed

    private void ManageOrderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageOrderButtonActionPerformed
        this.setVisible(false);
        manage_order next = new manage_order(this);
        next.setVisible(true);
    }//GEN-LAST:event_ManageOrderButtonActionPerformed

    private void ChangePasswordButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ChangePasswordButtonActionPerformed
        this.setVisible(false);
        change_password next = new change_password(this, pangalan, pass);
        next.setVisible(true);
    }//GEN-LAST:event_ChangePasswordButtonActionPerformed

    private void LogoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LogoutButtonActionPerformed
        this.setVisible(false);
        Login.setVisible(true);
    }//GEN-LAST:event_LogoutButtonActionPerformed
   
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new managementmodule(Login, pangalan, pass).setVisible(true);
            }
        });
    }

    private static Login Login;
    private static String pangalan;
    private static String pass;
    private static manage_order manage_order;
    private static manage_inventory manage_inventory;
    private static manage_menu manage_menu;
    private static change_password change_password;
    private static managementmodule managementmodule;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton ChangePasswordButton;
    private javax.swing.JButton LogoutButton;
    private javax.swing.JButton ManageInventoryButton;
    private javax.swing.JButton ManageMenuButton;
    private javax.swing.JButton ManageOrderButton;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    // End of variables declaration//GEN-END:variables
}
